import request from '@/utils/request'
 // 初始化待更换清单
export function getInitExchangeList(data) {
return request({
    url: '/exchange/init',
    method: 'post',
    data:data
})
}

// 移除待换货清单的商品项
export function removeBeforeExchangeItem(data) {
return request({
    url: '/exchange/remove/before?id='+data,
    method: 'post',
})
}

// 更换货物
export function addExchangeItem(data) {
return request({
    url: '/exchange/add',
    method: 'post',
    data:data
})
}

// 移除待换货清单的商品项
export function removeAfterExchangeItem(data) {
return request({
    url: '/exchange/remove/after',
    method: 'post',
    data:data,
})
}

// 确认更换
export function confirmExchange(reason,saleNo) {
return request({
    url: '/exchange/confirm?reason='+reason+'&saleNo='+saleNo,
    method: 'post',
})
}